# 项目:
# 文件: tools
# 作者: Yang
# 日期: 2025/5/23 15:28
# coding:utf-8
from certifi import contents


class Util:

    @classmethod
    def read_json(cls,path):
        import json
        with open(path,encoding='utf-8') as file:
            contents = json.load(file)
        return contents

    @classmethod
    def read_csv(cls,path):
        with open(path,encoding='utf-8') as file:
            contents = file.readlines()
            li = []
        for content in contents:
            if not content.startswith('# ') and content != '\n':
                if '# ' in content.strip():
                    item = content.strip().split('# ')[0].strip()
                else:
                    item = content.strip()
                li.append(item)
        return li

if __name__ == '__main__':
    Util.read_csv('smscript.csv')